$OpenBSD: patch-nspr_pr_src_misc_prnetdb_c,v 1.1 2013/06/23 18:36:50 landry Exp $
--- nspr/pr/src/misc/prnetdb.c.orig	Tue May 28 23:39:29 2013
+++ nspr/pr/src/misc/prnetdb.c	Wed Jun 12 21:26:27 2013
@@ -2044,7 +2044,9 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const 
          */
         hints.ai_socktype = SOCK_STREAM;
 
+	LOCK_DNS();
         rv = GETADDRINFO(hostname, NULL, &hints, &res);
+	UNLOCK_DNS();
 #ifdef AI_ADDRCONFIG
         if (rv == EAI_BADFLAGS && (hints.ai_flags & AI_ADDRCONFIG)) {
             hints.ai_flags &= ~AI_ADDRCONFIG;
